<?php
include('../../include/functions.inc.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Asignacion de Estudiantes</title>
        <link href="../../css/ContentStyle.css" rel="stylesheet" type="text/css" />
        <link href="../../css/tableorderer.css" rel="stylesheet" type="text/css" />
        <link href="../../js/dialog/dialog.2.0.css" rel="stylesheet" type="text/css" />
        <link href="../../js/protocalendar/datepicker.css" rel="stylesheet" type="text/css" />
        <script src="../../js/prototype.js" type="text/javascript"></script>
        <script src="../../js/protocalendar/prototype-date-extensions.js" type="text/javascript"></script>
        <script src="../../js/protocalendar/datepicker.js"  type="text/javascript"></script>
        <script src="../../js/dialog/dialog.2.0.js" type="text/javascript"></script>
        <script src="../../js/jsvalidate.js" type="text/javascript"></script>
        <script src="../../js/include.js" type="text/javascript"></script>
        <SCRIPT language="javascript">
            var rsv;
            function config(){
                rsv=new RSV({
                    formID: $(document.ASIGNACION),
                    errorFieldClass: "errorField",
                    rules: ["required,f1,Debe ingresar una fecha inicial!",
                        "required,f2,Debe ingresar una fecha final!"],
                    displayType : "display-html",
                    errorHTMLItemBullet : "&#8212; ",
                    onCompleteHandler:function(){
                        waitMsg("Generando reporte...");
                        $(document.ASIGNACION).request({onComplete:function(r){
                                $("facturas").update(r.responseText);
                                closeWait();
                            }});
                    }
                });
            }
            addOnLoad(config);
        </SCRIPT>
    </head>

    <body>
        <div id="rsvErrors"></div>
        <form id="ASIGNACION" name="ASIGNACION" method="GET" action="cfgFacturas.php">
            <table class="tableform"  width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                    <th scope="col">Reporte de Facturas por Fecha</th>
                </tr>

                <tr>
                    <td align="center" scope="col">
                        <table width="70%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                                <td width="14%">FECHA INICIAL</td>
                                <td width="21%"><input type="text" name="f1" id="f1" />
                                    <script type="text/javascript">
                                        new Control.DatePicker('f1', {icon: '../../js/protocalendar/calendar.png',dateFormat: 'yyyy-MM-dd'});
                                    </script>          </td>
                                <td width="12%">FECHA FINAL</td>
                                <td width="21%"><input type="text" name="f2" id="f2" />
                                    <script type="text/javascript">
                                        new Control.DatePicker('f2', {icon: '../../js/protocalendar/calendar.png',dateFormat: 'yyyy-MM-dd'});
                                    </script>          </td>
                                <td width="32%"><input name="ver" type="button" onclick="rsv.validate();" class="boton" id="ver" value="Buscar" />
                                    <input type="hidden" name="operation2" id="operation2" /></td>
                            </tr>
                        </table>      </td>
                </tr>
                <tr>
                    <th scope="col">Facturas Emitidas</th>
                </tr>
                <tr>
                    <td colspan="2"><div id="facturas" style="width:100%;"></div></td>
                </tr>
                <tr>
                    <td>&nbsp;</td>
                </tr>
            </table>
        </form>
    </body>
</html>
